home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Lengths
/
Generate
/
g-length2
< prev
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
1KB
|
19 lines
g-length2 seed position type length-value denominator numerator
position: f = first, l = last, r = random
type: rest, note
(setq pattern (distributive-square '(1 2 2 3)))
=> ((9 3 6 6) (3 1 2 2) (6 2 4 4) (6 2 4 4))
(g-length2 .4785 'r :note '(1 2 3) 20 pattern)
=> ((-3/10 3/20 1/20 -1/10 -1/4 1/20 1/10 -1/5) (3/20 1/20 1/10 1/10) (-1/5 1/10 -1/20 1/20 -1/20 3/20 1/20 -3/20) (-3/20 3/20 1/10 3/20 -1/20 1/20 -3/20))
(g-length2 .4785 'r :rest '(1 2 3) 20 pattern)
=> ((3/10 -3/20 -1/20 1/10 1/4 -1/20 -1/10 1/5) (3/20 1/20 1/10 1/10) (1/5 -1/10 1/20 -1/20 1/20 -3/20 -1/20 3/20) (3/20 -3/20 1/10 -3/20 1/20 -1/20 3/20))
(g-length2 .4785 'f :note '(1 2 3) '(20 12) pattern)
=> ((3/20 -3/10 1/20 -1/10 1/20 -1/4 1/10 -1/5) (1/4 1/12 1/6 1/6) (1/10 -1/5 1/20 -1/20 3/20 -1/20 1/20 -3/20) (1/4 -1/4 1/6 1/4 -1/12 1/12 -1/4))
(g-length2 .4785 'f :rest '(1 2 3) '(20 12) pattern)
=> ((-3/20 3/10 -1/20 1/10 -1/20 1/4 -1/10 1/5) (1/4 1/12 1/6 1/6) (-1/10 1/5 -1/20 1/20 -3/20 1/20 -1/20 3/20) (-1/4 1/4 1/6 -1/4 1/12 -1/12 1/4))